package gefmvc;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.draw2d.geometry.Point;

public class NodeModel {

	private List<NodeConnectionModel> sourceConnections = new ArrayList<NodeConnectionModel>();
	private List<NodeConnectionModel> targetConnections = new ArrayList<NodeConnectionModel>();
	private int xLocation;
	private int yLocation;
	private String label;
	private int next1 = 0;
	private int next2 = 0;
	private String type;
	public NodeModel(String s) {
		label = s;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getLabel() {
		return label;
	}

	public List<NodeConnectionModel> getSourceConnections() {
		return sourceConnections;
	}

	public List<NodeConnectionModel> getTargetConnections() {
		return targetConnections;
	}

	public void addSourceConnection(NodeConnectionModel iConnection) {
		sourceConnections.add(iConnection);
	}

	public void addTargetConnection(NodeConnectionModel iConnection) {
		targetConnections.add(iConnection);
	}

	public void setLocation(int x, int y) {
		this.xLocation = x;
		this.yLocation = y;
	}

	public Point getLocationPoin() {
		return new Point(xLocation, yLocation);
	}

	public void setNext(int next1, int next2) {
		this.next1 = next1;
		this.next2 = next2;
	}

	public int getNext1() {
		return next1;
	}

	public int getNext2() {
		return next2;
	}

	public void setNext1(int x) {
		next1 = x;
	}

	public void setNext2(int x) {
		next2 = x;
	}
	public void setType (String str){
		type=str;
	}
	public String getType (){
		return type;
	}
}